package wyj;

import java.util.Scanner;

public class 啊是大 {
   public static void main(String[] args){
       Scanner in = new Scanner(System.in);
        int n=in.nextInt();
       int m=in.nextInt();
       int x=0;
        for (int j=n;j<=m;j++){
            if (j==1){
                continue;
            }
            if (isprint(j)){
               if (x==0){
                   System.out.print(j);
                   x++;
               }
               else {
                   System.out.print(" "+j);
               }
            }
        }
   }
   public static boolean isprint(int n){
        int sum=1;
        boolean pd=false;
       for (int i=2;i<n;i++){
           for (int j=i+1;j<n;j++){
               if (i*j==n){
                sum=sum+i+j;
               }
           }
       }
       if (sum==n){
           pd=true;
       }
       return pd;
   }
}
